//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
    list:[]
  },

  onLoad: function () {
    let access_token = wx.getStorageSync('access_token')
    wx.request({
      url: 'https://baokang.wshoto.com/wx/signlist',
      data: {
        access_token: access_token,
      },
      success: (res) => {
        console.log(res)
        if(res.data.code >= 500){
          app.getLogin().then(function(){
            console.log('二次登录。。。')
          })
        } 
        else if(res.data.code == 1){
          this.setData({
            activityList: res.data.list
          })
        }
      }
    })
  },
})

